import request from "@/utils/request";
import { stringify } from "qs";
import { toFormData } from "@/utils/utils.jsx";

export default {
	//审核订单
	vertifyOrder(params) {
		return request(`/new-oms/order/audit/batch`, {
			method: 'post',
			data: params
		});
	},

	//返审核订单
	reVertifyOrder(params) {
		return request(`/new-oms/order/returnAudit/batch/confirm`, {
			method: 'post',
			data: params
		});
	},

	//作废订单
	voidOrder(params) {
		return request(`/new-oms/order/invalid/batch/confirm`, {
			method: 'post',
			data: params
		});
	},

	//取消作废订单
	cancelVoidOrder(params) {
		return request(`/new-oms/order/invalid/cancel`, {
			method: 'post',
			data: params
		});
	},

	//转异常订单
	abNormalOrder(params) {
		return request(`/new-oms/order/becomeError/batch`, {
			method: 'post',
			data: params
		});
	},

	//转正常订单
	normalOrder(params) {
		return request(`/new-oms/order/becomeNormal/batch/confirm`, {
			method: 'post',
			data: params
		});
	},


	//物流回传
	logisticReturn(params) {
		return request(`/new-oms-ec/orderBackFlowDetails/create`, {
			method: 'post',
			data: params
		});
	},

	//智能合单
	autoMergeOrder(params) {
		return request(`/new-oms/orderSplitMerge/manualAutoMergeOrder`, {
			method: 'post',
			data: params
		});
	},

	//按策略拆单
	strategySplitOrder(params) {
		return request(`/new-oms/orderSplitMerge/strategySplitOrder`, {
			method: 'post',
			data: params
		});
	},

	//批量发货
	batchOrderShip(params) {
		return request(`/new-oms/hot/order/deliver/batch`, {
			method: 'post',
			data: params
		});
	},

	//获取发货设置
	getShippingConfigList() {
		return request(`/new-wms/sortingvoiceconfiguration/getShippingConfigList`);
	}
}
//审核订单
// export async function getInventorytransactionRecordslist(params) {
// 	return request(`/new-wms/inventorytransactionrecords/list?${stringify(params)}`);
// },
